package com.ruoyi.school.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.domain.entity.SysUser;
import lombok.Data;

/**
 * 学生
 * @TableName student
 */
@TableName(value ="pac_student")
@Data
public class Student extends BaseEntity implements Serializable {
    /**
     * 学生id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 用户id
     */
    private Long userId;

    /**
     * 学生姓名
     */
    @Excel(name = "学生姓名")
    private String stuName;

    /**
     * 学号
     */
    @Excel(name = "学号")
    private String stuNum;

    /**
     * 院系
     */
    @Excel(name = "院系")
    private String stuFaculties;

    /**
     * 专业
     */
    private Long facultiesId;

    /**
     * 学院id
     */
    private Long collegeId;

    /**
     * 入学年份
     */
    @Excel(name = "入学年份")
    private String yearEnrollment;

    /**
     * 班级
     */
    @Excel(name = "班级")
    private String stuClass;

    /**
     * 联系电话
     */
    @Excel(name = "联系电话")
    private String stuPhone;

    /**
     * 毕业年份
     */
    @Excel(name = "毕业年份")
    private String stuGradYear;

    /**
     * 户籍地
     */
    @Excel(name = "户籍地")
    private String stuPlace;

    /**
     * 班级id
     */
    private Long classId;

    /**
     * 干部id
     */
    private Long cadreId;

    /**
     * 是否是党员(1:不是 2：是)
     */
    private Integer partyMember;

    /**
     * 创建人
     */
    private String createBy;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新人
     */
    private String updateBy;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 是否优秀
     */
    private String isGood;

    /**
     * 出生日期
     */
    @Excel(name = "出生日期")
    private String birth;

    /**
     * 城市
     */
    @Excel(name = "所在城市")
    private String stuCity;


    /**
     * 专业
     */
    @Excel(name = "专业")
    private String major;

    /**
     * 大队
     */
    @Excel(name = "大队")
    private String bigTeam;

    /**
     * 区队
     */
    @Excel(name = "区队")
    private String smallTeam;

    /**
     * 民族
     */
    @Excel(name = "民族")
    private String nation;

    /**
     * 政治面貌
     */
    @Excel(name = "政治面貌")
    private String politicalOutlook;

    /**
     * 性别
     */
    @TableField(exist = false)
    private String sex;

    /**
     * 辅导员
     */
    @TableField(exist = false)
    private String cadreName;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @TableField(exist = false)
    private SysUser sysUser;

    @TableField(exist = false)
    private List<Long> ids;

    @TableField(exist = false)
    private List<Integer> classIds;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Student other = (Student) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getStuName() == null ? other.getStuName() == null : this.getStuName().equals(other.getStuName()))
            && (this.getStuNum() == null ? other.getStuNum() == null : this.getStuNum().equals(other.getStuNum()))
            && (this.getStuFaculties() == null ? other.getStuFaculties() == null : this.getStuFaculties().equals(other.getStuFaculties()))
            && (this.getYearEnrollment() == null ? other.getYearEnrollment() == null : this.getYearEnrollment().equals(other.getYearEnrollment()))
            && (this.getStuClass() == null ? other.getStuClass() == null : this.getStuClass().equals(other.getStuClass()))
            && (this.getStuPhone() == null ? other.getStuPhone() == null : this.getStuPhone().equals(other.getStuPhone()))
            && (this.getStuGradYear() == null ? other.getStuGradYear() == null : this.getStuGradYear().equals(other.getStuGradYear()))
            && (this.getStuPlace() == null ? other.getStuPlace() == null : this.getStuPlace().equals(other.getStuPlace()))
            && (this.getClassId() == null ? other.getClassId() == null : this.getClassId().equals(other.getClassId()))
            && (this.getFacultiesId() == null ? other.getFacultiesId() == null : this.getFacultiesId().equals(other.getFacultiesId()))
            && (this.getCadreId() == null ? other.getCadreId() == null : this.getCadreId().equals(other.getCadreId()))
            && (this.getPartyMember() == null ? other.getPartyMember() == null : this.getPartyMember().equals(other.getPartyMember()))
            && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getStuName() == null) ? 0 : getStuName().hashCode());
        result = prime * result + ((getStuNum() == null) ? 0 : getStuNum().hashCode());
        result = prime * result + ((getStuFaculties() == null) ? 0 : getStuFaculties().hashCode());
        result = prime * result + ((getYearEnrollment() == null) ? 0 : getYearEnrollment().hashCode());
        result = prime * result + ((getStuClass() == null) ? 0 : getStuClass().hashCode());
        result = prime * result + ((getStuPhone() == null) ? 0 : getStuPhone().hashCode());
        result = prime * result + ((getStuGradYear() == null) ? 0 : getStuGradYear().hashCode());
        result = prime * result + ((getStuPlace() == null) ? 0 : getStuPlace().hashCode());
        result = prime * result + ((getClassId() == null) ? 0 : getClassId().hashCode());
        result = prime * result + ((getFacultiesId() == null) ? 0 : getFacultiesId().hashCode());
        result = prime * result + ((getCadreId() == null) ? 0 : getCadreId().hashCode());
        result = prime * result + ((getPartyMember() == null) ? 0 : getPartyMember().hashCode());
        result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userId=").append(userId);
        sb.append(", stuName=").append(stuName);
        sb.append(", stuNum=").append(stuNum);
        sb.append(", stuFaculties=").append(stuFaculties);
        sb.append(", yearEnrollment=").append(yearEnrollment);
        sb.append(", stuClass=").append(stuClass);
        sb.append(", stuPhone=").append(stuPhone);
        sb.append(", stuGradYear=").append(stuGradYear);
        sb.append(", stuPlace=").append(stuPlace);
        sb.append(", classId=").append(classId);
        sb.append(", facultiesId=").append(facultiesId);
        sb.append(", cadreId=").append(cadreId);
        sb.append(", partyMember=").append(partyMember);
        sb.append(", createBy=").append(createBy);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateBy=").append(updateBy);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}